﻿religious = {
	allowed_for_character = {
		OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you.
			is_independent_ruler = yes
			any_liege_or_above = {
				faith = prev.faith
				count = all
			}
		}
		faith = {
			NOR = {
				has_doctrine = unreformed_faith_doctrine # Unreformed Pagans cannot Holy War
				has_doctrine_parameter = holy_wars_forbidden # Pacifists cannot Holy War
			}
		}
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

#Holy wars that should be restricted if your liege disagrees, or your faith does, but which don't require organised religion. E.g., human sacrifice raids.
religious_disorganised= {
	allowed_for_character = {
		OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you.
			is_independent_ruler = yes
			any_liege_or_above = {
				faith = prev.faith
				count = all
			}
		}
		faith = {
			NOT = { has_doctrine_parameter = holy_wars_forbidden }	# Pacifists cannot Holy War
		}
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

religious_script_only = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
}

de_jure = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
	}
}

testing = {
	should_check_for_interface_availability = no
}

claim = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
	}
}

civil_war = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
}

invasion = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

vassalization = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

conquest = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

subjugation = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
		OR = {
			is_independent_ruler = yes
			has_game_rule = default_external_vw
			AND = {
				has_game_rule = player_external_vw
				any_player = { this = root }
			}
		}
	}
}

independence = {
	allowed_for_character = {
		#Game rules
		OR = {
			any_player = { this = root }
			NOT = { has_game_rule = no_ai_aggressiveness }
		}
	}
}

event = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
}